<?php

namespace Common\Bundle\LibraryBundle\Tests\Entity;

use Common\Bundle\LibraryBundle\Entity\Qcm;
use Symfony\Component\Validator\Validation;

class QcmTest extends \PHPUnit_Framework_TestCase{

    protected $qcm;

    public function setUp()
    {
        parent::setUp();

        $this->qcm = new Qcm();
    }

    public function testSetEtGetNom()
    {
        $this->qcm->setNom("Qcm test");
        $this->assertEquals("Qcm test",  $this->qcm->getNom());
    }

    public function testSetEtGetDescription()
    {
        $this->qcm->setDescription("Qcm description");
        $this->assertEquals("Qcm description",  $this->qcm->getDescription());
    }

    public function testSetEtGetOrdre()
    {
        $this->qcm->setOrdre(1);
        $this->assertEquals(1,  $this->qcm->getOrdre());
    }

    public function testSetEtGetDateCreation()
    {
        $dateCreation = new \DateTime('2014-02-14');
        $this->qcm->setDateCreation($dateCreation);
        $this->assertEquals($dateCreation,  $this->qcm->getDateCreation());
    }

}